<?php
//URL: http://localhost/ChampChooser/core/services/user/topNBatsmenService.php?count=5
require_once ("../../config/config.php");
require_once ("../../config/constants.php");
require_once ("../../db/queries.php");
require_once ("../../common/common.php");

$count = $_REQUEST["count"];

function findInDB($count) {
	if($count==''){
		$count=5;
	}
	$strQuery = "select * from $dbname.player p where p.playerType='Bowler' order by p.points DESC LIMIT $count;";
	return generateResultSet($strQuery);
}

makeQueryXML(findInDB($count));
?>